
#ifndef MATHS_H
#define MATHS_H

#include "Vector2D.h"

#ifndef PI
#define PI 3.14159265358979323846
#endif

#define DEG_TO_RAD *PI/180.f
#define RAD_TO_DEG *180.f/PI

typedef Vector2D Vector;
typedef double Scalar;
typedef double Angle;

class CMath
{
    
public:
    /*
    template<class T>
    static inline T& getMax(T& a, T& b)
    {
        return (a > b ? a : b);
    }
    
    template<class T>
    static inline T& getMin(T& a, T& b)
    {
        return (a < b ? a : b);
    }
    */
    //TODO: Work out how to use the reference versions above instead
    //TODO: Check that if possible it defaults to using the reference versions above
    template<class T>
    static inline T getMax(T a, T b)
    {
        return (a > b ? a : b);
    }
    
    template<class T>
    static inline T getMin(T a, T b)
    {
        return (a < b ? a : b);
    }
    
};

#endif // MATHS_H
